# def func(arg):
#     return arg.replace('苍老师', '***')
#
#
# def run():
#     msg = "Alex的女朋友苍老师和大家都是好朋友"
#     result = func(msg)
#     print(result)
#
#
# run()
# def func(arg):
#     return arg.replace('苍老师', '***')
#
#
# def run():
#     msg = "Alex的女朋友苍老师和大家都是好朋友"
#     result = func(msg)
#     print(result)
#
# data = run()
# print(data)
#
#
# DATA_LIST = []
#
#
# def func(arg):
#     return DATA_LIST.insert(0, arg)
#
#
# data = func('绕不死你')
# print(data)
# print(DATA_LIST)
#
# def func():
#     print('你好呀')
#     return '好你妹呀'
#
#
# func_list = [func, func, func]
#
# for item in func_list:
#     val = item()
#     print(val)

# def func():
#     print('你好呀')
#     return '好你妹呀'
#
#
# func_list = [func, func, func]
#
# for i in range(len(func_list)):
#     val = func_list[i]()
#     print(val)

# tips = "啦啦啦啦"
#
#
# def func():
#     print(tips)
#     return '好你妹呀'
#
#
# func_list = [func, func, func]
#
# tips = '你好不好'
#
# for i in range(len(func_list)):
#     val = func_list[i]()
#     print(val)

# def func():
#     return '烧饼'
#
#
# def bar():
#     return '豆饼'
#
#
# def base(a1, a2):
#     return a1() + a2()
#
#
# result = base(func, bar)
# print(result)
# def func():
#     return '烧饼'


# def bar():
#     return '豆饼'
#
#
# def base(a1, a2):
#     return a1 + a2
#
#
# result = base(func(), bar())
# print(result)
# v1 = lambda :100
# print(v1())
#
# v2 = lambda vals: max(vals) + min(vals)
# print(v2([11,22,33,44,55]))
#
# v3 = lambda vals: '大' if max(vals)>5 else '小'
# print(v3([1,2,3,4]))
#
# def func():
#     num = 10
#     v4 = [lambda :num+10,lambda :num+100,lambda :num+100,]
#     for item in v4:
#         print(item())
# func()
#
# for item in range(10):
#     print(item)
#
# print(item)
#
# def func():
#     for item in range(10):
#         pass
#     print(item)
# func()
# item = '老男孩'
# def func():
#     item = 'alex'
#     def inner():
#         print(item)
#     for item in range(10):
#         pass
#     inner()
# func()
# def func():
#     for num in range(10):
#         pass
#     v4 = [lambda :num+10,lambda :num+100,lambda :num+100,]
#     result1 = v4[1]()
#     result2 = v4[2]()
#     print(result1,result2)
# func()







# 二进制转换成十进制：
v = '0b1111011'
print(int(v,2))
# 十进制转换成二进制：
v = 18
print(bin(v))
# 八进制转换成十进制：
v = '011'
print(int(v,8))
# 十进制转换成八进制：
v = 30
print(oct(v))
# 十六进制转换成十进制：
v = "0x12"
print(int(v,16))
# 十进制转换成十六进制：
v = 87
print(hex(v))


